import React, { Component } from 'react'
import { View, Image,Platform } from 'react-native'
import PropTypes from 'prop-types';


const defaultOption = {
    color:"#eee",
    border:3,
    radius:5,
    opacity:0.08,
    x:1,
    y:1,
}

class ShadowBoxView extends Component {

    static propTypes= {

        style:PropTypes.object,
        shadowOption:PropTypes.object
    }


    static defaultProps ={
        shadowOption:defaultOption
    }

    constructor(props){
        super(props);

    }

    componentDidMount() {

    }

    render(){
        const {style,shadowOption} = this.props;

        return (
          <View style={[style,{
              shadowColor:'#999',
              shadowOffset:{width:1,height:1},
              shadowOpacity:shadowOption.opacity,
              shadowRadius:shadowOption.radius,
              borderRadius:shadowOption.radius,
              overflow:'hidden',
              backgroundColor:'#fff'
          }]}>
              {this.props.children}
          </View>
        )


    }
}
export default ShadowBoxView;
